<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import="com.lmpop.trade.ti_finance.*" %>
<%@page import="java.util.*" %>
<%@page import="com.lmpop.frame.util.PageTools" %>
<%
	request.setCharacterEncoding("UTF-8");
	Map ti_finance = new Hashtable();
	String s_cust_name = "",s_account_type="";
	if(request.getParameter("s_cust_name")!=null && !request.getParameter("s_cust_name").equals("")){
		s_cust_name = request.getParameter("s_cust_name");
		ti_finance.put("cust_name",s_cust_name);
	}
	if(request.getParameter("s_account_type")!=null && !request.getParameter("s_account_type").equals("")){
		s_account_type = request.getParameter("s_account_type");
		ti_finance.put("account_type",s_account_type);
	}
	String s_money_start = "";
	if(request.getParameter("s_money_start")!=null && !request.getParameter("s_money_start").equals("")){
		s_money_start = request.getParameter("s_money_start");
		ti_finance.put("money_start",s_money_start);
	}	
	String s_money_end = "";
	if(request.getParameter("s_money_end")!=null && !request.getParameter("s_money_end").equals("")){
		s_money_end = request.getParameter("s_money_end");
		ti_finance.put("money_end",s_money_end);
	}	
	
	ti_finance.put("order_method","vmoney");
	ti_finance.put("finance_type","1");
	
	
	
	Ti_financeInfo ti_financeInfo = new Ti_financeInfo();
	String iStart = "0";
	int limit = 20;
	if(request.getParameter("iStart")!=null) iStart = request.getParameter("iStart");
	List list = ti_financeInfo.getListByPage(ti_finance,Integer.parseInt(iStart),limit);
	int counter = ti_financeInfo.getCountByObj(ti_finance);
	String pageString = new PageTools().getGoogleToolsBar(counter,"index.jsp?s_account_type="+s_account_type+"&iStart=",Integer.parseInt(iStart),limit);
%>
<html>
  <head>
    
    <title>会员人民币充值管理</title>
	<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="/js/commen.js"></script>
	<script type="text/javascript" src="inter.js"></script>
</head>

<body>
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td width="90%">
				<h1>会员人民币充值管理</h1>
			</td>
			<td>
				
			</td>
		</tr>
	</table>
	
	<form action="index.jsp" name="indexForm" method="post">
	  
	<table width="100%" cellpadding="0" cellspacing="0" class="dl_su">
		<tr>
			<td align="left" >
				按会员名称：<input type="text" value="" name="s_cust_name" id="s_cust_name" maxlength="50" class="input" />
					按账户类型：<select name="s_account_type" >
									<option value="">请选择</option>
									<option value="1">预存款</option>
									<option value="2">保证金</option>
									</select>			
				按充值金额：<input type="text" value="" name="s_money_start" id="s_money_start" maxlength="10" class="input" />
				-<input type="text" value="" name="s_money_end" id="s_money_end" maxlength="10" class="input" />
				<input name="searchInfo" type="button" value="搜索" onclick="seacher();"/>
			</td>
		</tr>
	</table>

	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="tablehe">
		<tr><td><%=pageString %></td></tr>
	</table>
	
	<% 
		int listsize = 0;
		if(list!=null && list.size()>0){
			listsize = list.size();
	%>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="dl_bg">
		<tr>
			<td width="90%">
				
			</td>
			<td>
				总数:<%=counter %>条
			</td>
		</tr>
	</table>
	
	<table width="100%" cellpadding="1" cellspacing="1" class="listtab" border="0">
		<tr>
			
			
			<th>账户名称</th>
			
		  	<th>充值总额</th>
		  	
		  	<th>可用金额</th>
		  	
		  	<th>冻结金额</th>
		  	
			<th width="20%">操作</th>
		</tr>
		
		
		<% 
		  		for(int i=0;i<list.size();i++){
		  			Hashtable map = (Hashtable)list.get(i);
		  			String cust_id="",vmoney="0",use_vmoney="0",frz_vmoney="0",account_type="0",account_name="",remark="";
					String cust_name = "";
		  			  	if(map.get("cust_id")!=null) cust_id = map.get("cust_id").toString();
						if(map.get("cust_name")!=null) cust_name = map.get("cust_name").toString();
						if(map.get("vmoney")!=null) vmoney = map.get("vmoney").toString();
						if(map.get("use_vmoney")!=null) use_vmoney = map.get("use_vmoney").toString();
						if(map.get("frz_vmoney")!=null) frz_vmoney = map.get("frz_vmoney").toString();
						if(map.get("account_type")!=null) account_type = map.get("account_type").toString();
						if (account_type.equals("1"))
						{
							account_name = "<font color=red>产品预存账户</font>";
						}
					else if (account_type.equals("2"))
						{
							account_name = "<font color=blue>保证金账户</font>";
						}
						if(map.get("remark")!=null) remark = map.get("remark").toString();

		  %>
		
		<tr>
			
			
			<td><%=cust_name%>：<%=account_name%></td>
			
		  	<td><%=vmoney%></td>
		  	
		  	<td><%=use_vmoney%></td>
		  	
		  	<td><%=frz_vmoney%></td>
		  	
			<td width="10%"><a href="updateInfo.jsp?cust_id=<%=cust_id%>&account_type=<%=account_type%>&finance_type=1"><img src="/program/admin/images/edit.gif" title="财务调整" /></a>&nbsp;&nbsp;
	  		<a href="moneyHistory.jsp?cust_id=<%=cust_id%>&account_type=<%=account_type%>&finance_type=1"><img src="/program/admin/images/view.gif" title="查看详细" /></a></a></td>
		</tr>
		
		  <%
		  		}
		  %>
		
	</table>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="dl_bg">
		<tr>
			<td width="90%">
				
			</td>
			<td>
				总计:<%=counter %>条
			</td>
		</tr>
	</table>
	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="tablehe">
		<tr><td><%=pageString %></td></tr>
	</table>
	
	<%
		 }
	%>
	
	  <input type="hidden" name="listsize" id="listsize" value="<%=listsize %>" />
	  <input type="hidden" name="pkid" id="pkid" value="" />
	  <input type="hidden" name="bpm_id" id="bpm_id" value="6655" />
	  </form>
</body>

</html>
